home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / modula-3-faq < prev    next >
Encoding:
Text File  |  1995-07-25  |  62.2 KB  |  1,658 lines

  1. Subject: Modula-3 Frequently Asked Questions (FAQ)
  2. Newsgroups: comp.lang.modula3,news.answers,comp.answers
  3. From: Michel Dagenais <dagenais@vlsi.polymtl.ca>
  4. Date: 16 Nov 1994 16:08:46 GMT
  5.  
  6. Archive-name: Modula-3-faq
  7.  
  8.  
  9.    
  10.    
  11.                                  MODULA-3 FAQ
  12.                                        
  13.    
  14.    
  15.    Michel Dagenais, dagenais@vlsi.polymtl.ca
  16.    
  17.    
  18.    
  19.    v2.2, 30 August 1994
  20.    
  21.    
  22.    
  23. Contents
  24.  
  25.      * Contents
  26.      * What is new?
  27.      * The language
  28.           + What is Modula-3?
  29.           + Is Modula-3 a superset of Modula-2?
  30.      * The documentation
  31.           + Where can I get a description of Modula-3?
  32.           + Where can I get other information on Modula-3?
  33.      * The implementations
  34.           + Where can I get an implementation?
  35.           + What is SRC Modula-3?
  36.           + What is m3pc?
  37.      * Some specific questions
  38.           + Why is "Hello World" so large?
  39.           + Why objects and interfaces?
  40.           + Comparisons between Modula-3 and other languages?
  41.           + What is the story with Trestle and OpenWindows?
  42.           + Linking with C++ code
  43.           + Flushing writers to see the output immediately
  44.           + Problems with threads and VTALARM
  45.           + What is the purpose of BRANDED and REVEAL
  46.           + Why uppercase keywords
  47.           + M3build versus Make or why m3 does not work
  48.           + Missing RTHooks or similar messages
  49.           + The program receives a SEGV signal under the debugger
  50.           + What is M3-lite, MS-Windows support
  51.      * FTP
  52.           + How To Obtain Pre-Compiled Binaries
  53.           + What if I don't have ftp access?
  54.      * Contributing
  55.           + Can I contribute Modula-3 software?
  56.           + ILU, an object-oriented multi-lingual RPC-capable module
  57.             system
  58.      * Modula-3 for teaching
  59.      * Modula-3 In Industry
  60.      * Work In Progress
  61.           + The SRC Compiler
  62.           + Modula-2 To Modula-3 Converter
  63.           + Integrated Development Environment
  64.           + Windowing And User Interfaces
  65.                o Rotated Text
  66.                o Postscript VBTs
  67.           + Persistent Objects
  68.           + Abstract Syntax Tree Tools (M3 Parser)
  69.           + Computer Assisted Learning Tools (Algorithm Animation)
  70.           + Presentations, Tutorials And Teaching Material
  71.           + Reports And Books
  72.           + Parallel Programming
  73.      * Wish List
  74.           + M3Build
  75.           + Coverage And Performance Analysis
  76.           + More VBTs
  77.           + Distributed Computing (Network Objects)
  78.           + Interfaces To Other Libraries And Programs (Tcl, Dps...)
  79.      * Who's Who
  80.        
  81.   ABSTRACT:
  82.   
  83.    This document contains references to most of the material available
  84.    on the Modula-3 language, compiler, tools and libraries. It should
  85.    answer all the most frequently asked questions about Modula-3. The
  86.    FAQ was originally written by Eric Muller. Send corrections,
  87.    suggestions, additions to the current maintainer, Michel Dagenais
  88.    dagenais@vlsi.polymtl.ca.
  89.    
  90.    The postscript version is available on
  91.    ftp.vlsi.polymtl.ca:pub/m3/m3-faq.ps.
  92.    
  93.    An hypertext WWW version is found on
  94.    http://froh.vlsi.polymtl.ca/m3/m3-faq.html.
  95.    
  96.    
  97.    
  98.    
  99.    
  100.                                  WHAT IS NEW?
  101.                                        
  102.    
  103.    
  104.    The FAQ answers several new questions, lists new binaries available
  105.    and lists the ports under way.
  106.    
  107.                                  THE LANGUAGE
  108.                                        
  109.    
  110.    
  111. What is Modula-3?
  112.  
  113.    
  114.    
  115.    Modula-3 is a systems programming language that descends from Mesa,
  116.    Modula-2, Cedar, and Modula-2+. It also resembles its cousins Object
  117.    Pascal, Oberon, and Euclid.
  118.    
  119.    The goal of Modula-3 is to be as simple and safe as it can be while
  120.    meeting the needs of modern systems programmers. Instead of exploring
  121.    new features, they studied the features of the Modula family of
  122.    languages that have proven themselves in practice and tried to
  123.    simplify them into a harmonious language. They found that most of the
  124.    successful features were aimed at one of two main goals: greater
  125.    robustness, and a simpler, more systematic type system.
  126.    
  127.    Modula-3 retains one of Modula-2's most successful features, the
  128.    provision for explicit interfaces between modules. It adds objects and
  129.    classes, exception handling, garbage collection, lightweight processes
  130.    (or threads), and the isolation of unsafe features.
  131.    
  132. Is Modula-3 a superset of Modula-2?
  133.  
  134.    
  135.    
  136.    No; valid Modula-2 programs are not valid Modula-3 programs. However,
  137.    there is a tool to help convert Modula-2 programs to Modula-3.
  138.    
  139.                                THE DOCUMENTATION
  140.                                        
  141.    
  142.    
  143. Where can I get a description of Modula-3?
  144.  
  145.    
  146.    
  147.    The language definition and most electronically available Modula-3
  148.    information can be accessed on:
  149.    
  150.    Modula-3 Home
  151.    
  152.    The definition of Modula-3 is contained in:
  153.    
  154.      * System Programming with Modula-3 Edited by Greg Nelson Prentice
  155.        Hall Series in Innovative Technology ISBN 0-13-590464-1 L.C.
  156.        QA76.66.S87 1991
  157.        
  158.    
  159.    
  160.    also known as SPwM3. Here is the table of contents:
  161.    
  162.     1. Introduction
  163.     2. Language Definition
  164.     3. Standard Interfaces
  165.     4. An Introduction to Programming with Threads
  166.     5. Thread Synchronization: A Formal Specification
  167.     6. I/O Streams: Abstract Types, Real Programs
  168.     7. Trestle Window System Tutorial
  169.     8. How the Language Got its Spots
  170.        
  171.    
  172.    
  173.    Chapters 2 and 3 have been reprinted in Sigplan Notices, Volume 27,
  174.    Number 8, August 1992, pp 15-42.
  175.    
  176.    Sam Harbison has written a more tutorial book about Modula3:
  177.    
  178.      * Modula-3 Samuel P. Harbison Prentice Hall, 1992 ISBN 0-13-596396-6
  179.        
  180.    
  181.    
  182.    The table of contents is as follows:
  183.    
  184.     1. Introduction
  185.     2. Declarations
  186.     3. Statements
  187.     4. Basic Types
  188.     5. Structured Types
  189.     6. Procedures
  190.     7. Exceptions
  191.     8. Interfaces and Modules
  192.     9. Generics
  193.    10. Dynamic Programming
  194.    11. Objects
  195.    12. Threads
  196.    13. Low-Level Programming
  197.    14. Programming Conventions
  198.    15. SRC Modula-3
  199.    16. Modula-3 Syntax
  200.    17. Answers to Selected Exercises
  201.        
  202.    
  203.    
  204.    The errata sheet is available via anonymous ftp from
  205.    gatekeeper.dec.com in pub/DEC/Modula-3/errata.
  206.    
  207.    Errata
  208.    
  209.    If you cannot find these books at your favorite bookstore, here are
  210.    bookstores connected to the net known to carry them:
  211.    
  212.    UCI carries both books:
  213.    
  214.    UCI Bookstore
  215.    
  216.    While Roswell is known to at least carry the language definition
  217.    (SPwM3):
  218.    
  219.    Roswell Electronic Computer Bookstore (rjames@fox.nstn.ns.ca)
  220.    
  221.    Roswell Bookstore
  222.    
  223. Where can I get other information on Modula-3?
  224.  
  225.    
  226.    
  227.    There is a Usenet newsgroup, comp.lang.modula3. The archives of that
  228.    group are available via anonymous ftp from gatekeeper.dec.com in
  229.    pub/DEC/Modula-3/comp.lang.modula3. If you do not have access to
  230.    Usenet, there is a relay mailing list; send a message to
  231.    m3-request@src.dec.com to be added to it.
  232.    
  233.    Comp.lang.modula3 archive
  234.    
  235.    There are a couple high-level overview articles available:
  236.    
  237.      * ``Modula-3'', Sam Harbison, Byte, Vol. 15, No. 12, November 1990,
  238.        pp 385+.
  239.      * ``Safe Programming with Modula-3'', Sam Harbison, Dr. Dobb's
  240.        Journal, Vol. 17, No. 10, October 1992, pp 88+.
  241.        
  242.    
  243.    
  244.    A description of the Modula-3 type system is in
  245.    
  246.      * ``The Modula-3 Type System'', Luca Cardelli, Jim Donahue, Mick
  247.        Jordan, Bill Kalsow, Greg Nelson, Conference Record of the
  248.        Sixteenth Annual ACM Symposium on Principles of Programming
  249.        Languages (POPL), Austin Texas, January 11-13 1989, pp 202-212.
  250.        
  251.    
  252.    
  253.    The Modula-3 treatment of floating-point values is described in
  254.    
  255.      * ``The Design of Floating-Point Data Types'', David Goldberg, ACM
  256.        Letters on Programming Languages and Systems (LOPLAS), June 1992,
  257.        Vol 1, no.2, pp 138-151
  258.        
  259.    
  260.    
  261.    The core library interfaces are described and indexed in
  262.    
  263.      * ``Some Useful Modula-3 Interfaces'', Jim Horning, Bill Kalsow,
  264.        Paul McJones, Greg Nelson, SRC Research Report 113. Available via
  265.        anonymous FTP from gatekeeper.dec.com in
  266.        pub/DEC/SRC/research-reports/SRC-113.ps.Z
  267.        
  268.        Libm3
  269.        
  270.      * ``Pickles: a system for automatic serialization of typed values'',
  271.        Andrew Birrell, Greg Nelson, Susan Owicki, Edward Wobber, Systems
  272.        Research Center, Digital Equipment Corp., in preparation.
  273.        
  274.    
  275.    
  276.    The Trestle window system toolkit, higher-level FormsVBT toolkit, and
  277.    Zeus animation system available with Modula-3, are documented in the
  278.    following reports:
  279.    
  280.      * ``Trestle Reference Manual'', Mark S. Manasse and Greg Nelson, SRC
  281.        Research Report 68, December 1991.
  282.      * ``Trestle Tutorial'', Mark S. Manasse and Greg Nelson, SRC
  283.        Research Report 69, May 1, 1992.
  284.      * ``VBTkit Reference Manual: A toolkit for Trestle'', edited by Marc
  285.        H. Brown and James R. Meehan. (to be a SRC Research Report) A
  286.        draft version is available via anonymous FTP from
  287.        gatekeeper.dec.com in
  288.        pub/DEC/Modula-3/contrib/vbtkit.25Mar93.ps.Z.
  289.        
  290.        VBTKit
  291.        
  292.      * ``The FormsVBT Reference Manual'', Marc H. Brown and James R.
  293.        Meehan, (to be a SRC Research Report). A draft version is
  294.        available via anonymous FTP from gatekeeper.dec.com in
  295.        pub/DEC/Modula-3/contrib/formsvbt.25Mar93.ps.Z and
  296.        pub/DEC/Modula-3/contrib/formsvbt.AppC.26Mar93.ps.Z.
  297.        
  298.        VBTKit library
  299.        
  300.        VBTKit applications
  301.        
  302.      * ``Zeus: A System for Algorithm Animation and Multi-View Editing'',
  303.        Marc H. Brown, SRC Research Report 75, February 28, 1992.
  304.        Available via anonymous FTP from gatekeeper.dec.com in
  305.        pub/DEC/SRC/research-reports/SRC-075*.ps.Z.
  306.        
  307.        Zeus
  308.        
  309.      * ``Color and Sound in Algorithm Animation'', Marc H. Brown and John
  310.        Hershberger, SRC Research Report 76a, August 30, 1991. Available
  311.        via anonymous FTP from gatekeeper.dec.com in
  312.        pub/DEC/SRC/research-reports/SRC-076a*.ps.Z.
  313.        
  314.        Color and Sound
  315.        
  316.      * ``The 1992 SRC Algorithm Animation Festival'', Marc H. Brown, SRC
  317.        Research Report 98, March 27, 1993. Available via anonymous ftp
  318.        from gatekeeper.dec.com in
  319.        pub/DEC/SRC/research-reports/SRC-098*.ps.Z.
  320.        
  321.        Animation Festival
  322.        
  323.    
  324.    
  325.    Network objects are described in the following reports:
  326.    
  327.      * ``Network Objects'', Andrew Birrell, Greg Nelson, Susan Owicki,
  328.        and Edward Wobber, SRC Research Report 115, February 28, 1994.
  329.        Available via anonymous FTP from gatekeeper.dec.com in
  330.        pub/DEC/SRC/research-reports/SRC-115*.ps.Z.
  331.        
  332.        Network Objects
  333.        
  334.      * ``Distributed garbage collection for Network Objects'', Andrew
  335.        Birrell, David Evers, Greg Nelson, Susan Owicki, and Edward
  336.        Wobber, SRC Research Report 116, December 1993. Available via
  337.        anonymous FTP from gatekeeper.dec.com in
  338.        pub/DEC/SRC/research-reports/SRC-116*.ps.Z.
  339.        
  340.        Distributed GC
  341.        
  342.    
  343.    
  344.    While the Obliq embeddable interpreter is documented in:
  345.    
  346.      * ``Obliq: A lightweight language for network objects'', Luca
  347.        Cardelli, User's Manual, Systems Research Center, Digital
  348.        Equipment Corp., 1994. Available via anonymous FTP from
  349.        gatekeeper.dec.com in pub/DEC/Modula-3/contrib/Obliq.ps.
  350.        
  351.        Obliq
  352.        
  353.    
  354.    
  355.    Hardcopy versions of these reports can be ordered by e-mail; send your
  356.    request including a postal mail address to src-reports@src.dec.com.
  357.    
  358.    SRC research reports
  359.    
  360.    Sedgewick's classic text on computer algorithms is presented in
  361.    Modula-3 in:
  362.    
  363.      * Algorithms in Modula-3 Robert Sedgewick Addison-Wesley, 1993 ISBN
  364.        0-201-53351-0
  365.        
  366.    
  367.    
  368.                               THE IMPLEMENTATIONS
  369.                                        
  370.    
  371.    
  372. Where can I get an implementation?
  373.  
  374.    
  375.    
  376.    Two implementations are available, SRC Modula-3 and a PC version of it
  377.    (m3pc).
  378.    
  379.    As far as we know, implementations are not available for VMS,
  380.    Macintosh.
  381.    
  382. What is SRC Modula-3?
  383.  
  384.    
  385.    
  386.    SRC Modula-3 was built by the DEC Systems Research Center and is
  387.    available via anonymous ftp from gatekeeper.dec.com in
  388.    pub/DEC/Modula-3. The most recent version is release 3.3. The previous
  389.    release, 3.1, was a major new release intended mostly for porting to
  390.    architectures other than DEC. A list of known problems and patches is
  391.    available in:
  392.    
  393.    patches
  394.    
  395.    This release is known to work on at least on the DS3100
  396.    (m3-request@src.dec.com), HPPA (laverman@cs.rug.nl), LINUX
  397.    (dagenais@vlsi.polymtl.ca), NeXT 68000 (tom@smart.ruhr.de),
  398.    (nayeri@gte.com) SPARC architectures. Work is under way to port to the
  399.    Macintosh (George Andre dat94gan@ludat.lth.se), OS/2 (Hendrik Boom
  400.    hendrick@CAM.ORG), AIX 3.2.5 for RISC/6000 (Bob Barton
  401.    barton@chopin.eche.ualberta.ca), FreeBSD (Olaf Wagner
  402.    olaf@logware.de). The SPARC release notes may be found on
  403.    ftp.gte.com:pub/m3 while the LINUX ones are available on
  404.    ftp.vlsi.polymtl.ca:pub/m3/linux/README and the HPPA notes are in
  405.    ftp.vlsi.polymtl.ca:pub/m3/hppa/README.
  406.    
  407.    SRC-Modula-3
  408.    
  409.    SPARC release notes
  410.    
  411.    LINUX release notes
  412.    
  413.    HPPA release notes
  414.    
  415.    The compiler implements the language defined in SPwM3. There are
  416.    versions for the architectures listed below. While SRC can test on
  417.    DS3100, ALPHA/OSF and LINUX, it can only rely on what users on other
  418.    platforms tell them to integrate all the platform specific code.
  419.    
  420.    Because of the improved portability of the 3.* release, ports to non
  421.    Unix platforms are easier. A port to Windows NT and/or Windows 3.1 may
  422.    be available in the future. The Windows NT port, in progress, uses
  423.    native threads. This should be a good model for other implementations
  424.    of Thread using native threads.
  425.    
  426.      * AIX386 IBM PC running AIX/PS2,
  427.      * AOSF DEC Alpha AXP running OSF/1
  428.      * AP3000 Apollo DN4500 running Domain/OS
  429.      * ARM Acorn R260 running RISC iX 1.21
  430.      * DS3100 DECstation 3100 and 5000 running Ultrix 4.0 and 4.2
  431.      * HP300 HP 9000/300 running HP-UX 8.0
  432.      * HPPA HP 9000/700, 9000/800 running HP-UX 8.0
  433.      * IBMR2 IBM R6000 running AIX 3.1,
  434.      * IBMRT IBM RT running IBM/4.3,
  435.      * LINUX Intel 386 running LINUX
  436.      * NEXT NeXT running ??
  437.      * NT386 Intel 386 running Windows NT
  438.      * OKI Okidata 7300 (i860) running UNIX SVR4.0
  439.      * SEQUENT Sequent computers running ??
  440.      * SOL2 Sparc running Solaris 2.x
  441.      * SPARC SPARCstation running SunOS 4.1.x
  442.      * SUN3 SUN3 running SunOS
  443.      * SUN386 Sun 386i running SunOS 4.0.1
  444.      * UMAX Encore Multimax running UMAX 4.3 (R4.1.1)
  445.      * VAX VAX running Ultrix 3.1
  446.        
  447.    
  448.    
  449.    The new native compiler is based on GCC and should be fairly easy to
  450.    port. Except for the very lowest levels of the thread implementation,
  451.    the entire system is written in Modula-3.
  452.    
  453.    The DEC SRC Modula-3 release 3.3 contains the following:
  454.    
  455.      * A native code compiler: uses the GCC backend; on
  456.        machines/operating systems that have self-describing stacks, an
  457.        optimized exception handling mechanism is provided, on other
  458.        architectures, setjmp/longjmp is used.
  459.        
  460.        The compilation system provides for minimal recompilation. Only
  461.        those units that depend on the modified interface item will be
  462.        recompiled.
  463.      * m3utils/m3build: tool that performs dependency analysis and builds
  464.        the Modula-3 programs and libraries.
  465.      * A large standard library (libm3) providing
  466.        
  467.           + A multithread, incremental, generational, conservative
  468.             garbage collector
  469.           + Text manipulation.
  470.           + Generic Containers: Lists, Sequences, Tables, SortedLists,
  471.             SortedTables
  472.           + Atoms and Symbolic expressions (Lisp like lists)
  473.           + An extensible stream IO system
  474.           + Typesafe binary object transcription (persistent objects)
  475.           + Operating system interfaces
  476.           + Portable interfaces to the language runtime
  477.    
  478.        
  479.        All standard libraries are thread-friendly. Modula-3 can readily
  480.        link with existing C libraries; many libraries including X11R4 and
  481.        various UNIX libraries are available as part of libm3.
  482.      * m3gdb: a Modula-3 aware version of GDB.
  483.      * trestle: a multi-threaded window system interface that sits on top
  484.        of X windows. It is not unlike InterViews and comes with several
  485.        sample programs.
  486.      * trestle/tcp: a library for simplified access to TCP/IP.
  487.      * vbtkit: a higher level toolkit on top of Trestle. It offers
  488.        buttons, menus, editors, file choosers... and has a Motif-like
  489.        look and feel.
  490.      * formsvbt: an interactive user interface builder. A symbolic
  491.        expression representing the user interface is edited and the
  492.        graphical view is immediately produced.
  493.      * tools/coverage: tool to determine the number of times each
  494.        statement is executed.
  495.      * tools/pp: pretty printer for Modula-3 programs.
  496.      * tools/gnuemacs: emacs lisp files to help editing and debugging
  497.        Modula-3 programs in emacs.
  498.      * tools/m3bundle: tool to bundle data files into an executable to
  499.        produce standalone programs.
  500.      * tools/m3totex: extract TeX documentation from Modula-3 programs
  501.        for a form of literate programming.
  502.      * tools/showheap: tool to graphically see the behavior of the
  503.        garbage collector.
  504.      * tools/shownew: tool to graphically see the allocation behavior of
  505.        a running program.
  506.      * tools/showthread: tool to see the activation of threads in a
  507.        running program.
  508.      * zeus: framework to develop graphical animations of algorithms
  509.        (heapsort, quicksort, LRU cache replacement, network protocols...)
  510.        for visualization and teaching purposes.
  511.      * mentor: a dozen of animations developed using Zeus.
  512.      * netobj: network objects that allow the transparent execution of
  513.        methods across process and machine boundaries. A simple yet very
  514.        effective way to build distributed applications.
  515.      * obliq: simple, interpreted, lexically scoped, object oriented,
  516.        distributed programming language that can be embedded in Modula-3
  517.        programs and call/be-called by Modula-3 procedures. The Obliq
  518.        object model is based on prototypes and delegation.
  519.      * A framework for parsing and analyzing Modula-3 programs. This is a
  520.        complete AST toolkit for Modula-3. This can parse arbitrary
  521.        Modula-3 sources (input isn't required to be a complete unit) and
  522.        produce detailed ASTs representing the input. The ASTs can be used
  523.        to do a variety of semantic analysis tasks, or program generation
  524.        tasks similar to Lisp environments. (m3tk).
  525.      * pkgtools/smalldb: library to store objects on disk with logging
  526.        and recovery capabilities.
  527.      * pkgtools: distribution tool that insures that several copies of a
  528.        package (software, document...) are updated simultaneously.
  529.      * postcard: mail and news reading environment.
  530.      * visualobliq: a graphical user interface builder coupled with a
  531.        simple yet powerful interpreted language, Obliq, for rapid
  532.        development of interactive distributed applications.
  533.      * This is a rather new component and is undergoing a fair amount of
  534.        evolution; however, it is still very useful and exciting. Visual
  535.        Obliq provides an application builder similiar in nature to Visual
  536.        Basic. However, it uses Obliq as its scripting language. This
  537.        makes it easy to build and prototype interesting distributed and
  538.        groupware applications. It can be used for building
  539.        non-distributed applications as well.
  540.      * misc/tcl: interface to access the Tcl language from Modula-3.
  541.      * misc/dps: interface to access Display Postscript from Modula-3.
  542.      * games: more sample Trestle applications.
  543.        
  544.    
  545.    
  546. What is m3pc?
  547.  
  548.    
  549.    
  550.    A newer version of m3pc, code named EX32 in the README file, is
  551.    available via anonymous ftp from gatekeeper.dec.com in
  552.    pub/DEC/Modula-3/contrib/M3forDOS.
  553.    
  554.    PC Modula-3
  555.    
  556.    From the README, written by Klaus Preschern:
  557.    
  558.    EX32 ("A 32-bit Extension of DOS") is a environment for the
  559.    developement and execution of 32-bit applications with DOS.
  560.    
  561.    EX32 is a collection of DOS programs (drivers + kernel). It provides
  562.    services for applications executed in protected mode. It does process
  563.    management, virtual memory management, interprocess communication via
  564.    pipes and it offers a file system with 32 character filenames.
  565.    
  566.    EX32 runs on MS-DOS 5.00, 6.00 and 6.02. You need a i386/i387
  567.    (coprocessor required) or upward (i486, Pentium). EX32 supports DOS
  568.    XMS memory (but not EMS, VCPI or DPMI). No support for the i286. You
  569.    should have at least 4 MB memory (8 MB or more recommended). The whole
  570.    package occupies unzipped and untared approximately 44 MB of disk
  571.    space.
  572.    
  573.    EX32 comes with GNU C++ (version 2.4.5), SRC Modula-3 (version 3.1,
  574.    including threads), two C libraries, a graphics library for VGA and a
  575.    number of commands (i.e. ls, cp, rm, mkdir, make, ...).
  576.    
  577.    Note: This is a system for experienced programmers! They should be
  578.    familiar with Unix and DOS.
  579.    
  580.                             SOME SPECIFIC QUESTIONS
  581.                                        
  582.    
  583.    
  584. Why is "Hello World" so large?
  585.  
  586.    
  587.    
  588.    Modula-3 programs are larger than C programs for the following
  589.    reasons:
  590.    
  591.     1. The fixed runtime is substantially larger. It contains a garbage
  592.        collector, a thread runtime, and exception support. Note that
  593.        "Hello World" is virtually all runtime. For larger programs the
  594.        runtime is not an issue.
  595.     2. The generated code includes runtime checks for out-of-bound array
  596.        references and NIL pointer. Many of these checks could be removed
  597.        by a more sophisticated compiler.
  598.        
  599.    
  600.    
  601. Why objects and interfaces?
  602.  
  603.    
  604.    
  605.    Allan Heydon on comp.lang.modula3, May 4th 1993:
  606.    
  607.    Modula-3 provides two separate mechanisms for data-hiding: one for
  608.    hiding details about how interfaces are implemented, and the other for
  609.    hiding details about how objects are implemented.
  610.    
  611.    The first data-hiding mechanism is realized by the distinction between
  612.    interfaces and modules. Clients can only import interfaces, so the
  613.    names declared in the modules implementing those interfaces are hidden
  614.    from clients. Note that this mechanism has only two levels; a name is
  615.    either declared in an interface, or it isn't. If a name is only
  616.    declared in a module, it can't be used by a client.
  617.    
  618.    The second data-hiding mechanism is realized by opaque types and
  619.    revelations. A Modula-3 interface may declare an object type to be
  620.    opaque, in which case only a subset of the fields and methods of that
  621.    object are revealed to clients importing the interface. Furthermore,
  622.    the Modula-3 revelation mechanism allows a designer to reveal
  623.    successively more fields and methods of an object in a series of
  624.    interfaces. The fields and methods visible to a client then depends on
  625.    which interfaces the client imports.
  626.    
  627.    The latter mechanism is quite flexible. As opposed to the
  628.    interface/module data-hiding mechanism, opaque types allow you to
  629.    define an arbitrary number of levels at which more and more
  630.    information about the implementation of your object is revealed.
  631.    
  632.    See Sections 2.2.10, 2.4.6, and 2.4.7 of ``Systems Programming with
  633.    Modula-3" for more information about opaque types and about partial
  634.    and complete revelations.
  635.    
  636. Comparisons between Modula-3 and other languages?
  637.  
  638.    
  639.    
  640.    From: laszlo@post.ifi.uni-klu.ac.at (Laszlo BOESZOERMENYI)
  641.    
  642.    "A Comparison of Modula-3 and Oberon-2" by myself in "Structured
  643.    Programming" 1993, 14:15-22
  644.    
  645.    From: nayeri@gte.com
  646.    
  647.    Robert Henderson, Benjamin Zorn, A Comparison of Object-Oriented
  648.    Programming in Four Modern Languages, Department of Computer Science,
  649.    University of Colorado, Boulder, Colorado, Technical Report
  650.    CU-CS-641-93. Available by anonymous FTP and e-mail from
  651.    ftp.cs.colorado.edu in the file
  652.    pub/cs/techreports/zorn/CU-CS-641-93.ps.Z
  653.    
  654.    The paper evaluates Oberon, Modula-3, Sather, and Self in the context
  655.    of object-oriented programming. While each of these programming
  656.    languages provide support for classes with inheritance, dynamic
  657.    dispatch, code reuse, and information hiding, they do so in very
  658.    different ways and with varying levels of efficiency and simplicity. A
  659.    single application was coded in each language and the experience
  660.    gained forms the foundation on which the subjective critique is based.
  661.    
  662.    
  663. What is the story with Trestle and OpenWindows?
  664.  
  665.    
  666.    
  667.    Mark Manasse says:
  668.    
  669.    I think that the OpenWindows release should be enough (no need to get
  670.    the MIT X release), although there are a few things in Trestle that
  671.    trigger devastating bugs in OpenWindows. But the only library we
  672.    depend on is Xlib, R4 or later.
  673.    
  674.    The main thing I know that crashes OW 2.0 is the code where we call
  675.    GrabKey specifying AnyKey. You can either loop over all of the keys,
  676.    or you can just comment out the call; programs won't run exactly the
  677.    same, but you probably won't notice the difference.
  678.    
  679. Linking with C++ code
  680.  
  681.    
  682.    
  683.    Apparently there is no problem to call C++ functions declared as
  684.    extern "C".
  685.    
  686.    From: gwyant@cloyd.East.Sun.COM (Geoffrey Wyant - Sun Microsystems
  687.    Labs BOS)
  688.    
  689.    You must use your C++ compiler as the linker, rather than /bin/cc or
  690.    /bin/ld.
  691.    
  692.    You need to call the function '_main'. The easiest way to do this is
  693.    to have the following set of interfaces and implementations:
  694.    
  695.  
  696.         INTERFACE CXXMain;
  697.           <*EXTERN "_main"*> CxxMain;
  698.         END CXXMain;
  699.  
  700.         MODULE CXXMain;
  701.         BEGIN
  702.           CxxMain();
  703.         END;
  704.  
  705.    
  706.    
  707.    and then import CXXMain into your M3 main module. This will ensure
  708.    that the C++ function "_main" gets called.
  709.    
  710. Flushing writers to see the output immediately
  711.  
  712.    
  713.    
  714.    Modula-3 Writers are buffered. Thus, you need to issue a Wr.Flush when
  715.    the output should appear immediately, for instance to prompt the user
  716.    for some input. Since this can become annoying, libraries in other
  717.    languages sometimes offer the option of unbuffered writes. In
  718.    Modula-3, an equivalent behavior is obtained with AutoFlushWr which
  719.    gets a background thread to flush a writer at a specified interval.
  720.    
  721. Problems with threads and VTALARM
  722.  
  723.    
  724.    
  725.    The threads are implemented using the virtual timer interrupt.
  726.    Normally, the run time environment will catch the interrupt and
  727.    determine if thread switching is appropriate. However, if a new
  728.    process is created with fork, it will have the virtual timer activated
  729.    and no interrupt handler to receive it, resulting in a core dump. If
  730.    you use the standard procedure Process.Create to fork new processes,
  731.    this will be handled automatically for you. If you insist on using
  732.    fork, you need to disable the timer, fork and then reenable the timer.
  733.    
  734.    
  735. What is the purpose of BRANDED and REVEAL
  736.  
  737.    
  738.    
  739.    Allan Heydon writes:
  740.    
  741.    These two keywords are necessary because of two quite different
  742.    features of the language. REVEAL is necessary because Modula-3 has
  743.    opaque types and partial revelations. BRANDED is necessary because the
  744.    Modula-3 type system uses structural equivalence instead of name
  745.    equivalence.
  746.    
  747.    In Modula-3, the concrete structure of a type can be hidden from
  748.    clients in an interface. A common idiom is:
  749.    
  750.  
  751.   INTERFACE I;
  752.  
  753.   TYPE
  754.     T <: TPublic;
  755.     TPublic = OBJECT
  756.       (* fields *)
  757.     METHODS
  758.       (* methods *)
  759.     END;
  760.  
  761.   END I.
  762.  
  763.    
  764.    
  765.    The line "T <: TPublic" introduces the type "I.T" as an opaque subtype
  766.    of the type "I.TPublic". It does not reveal any of the other details
  767.    of the concrete structure of "I.T" to clients. Hence, "I.T" is said to
  768.    be an opaque type. Put another way, the structure of "I.T" is only
  769.    partially revealed to clients.
  770.    
  771.    In addition, it is possible to reveal more of "I.T"'s structure in
  772.    other interfaces, like this:
  773.    
  774.  
  775.   INTERFACE IRep;
  776.  
  777.   IMPORT I;
  778.  
  779.   TYPE
  780.     TPrivate = I.TPublic OBJECT
  781.       (* more fields *)
  782.     METHODS
  783.       (* more methods *)
  784.     END;
  785.  
  786.   REVEAL
  787.     I.T <: TPrivate;
  788.  
  789.   END IRep.
  790.  
  791.    
  792.    
  793.    This interface declares a type "IRep.TPrivate" that is a subtype of
  794.    "I.TPublic". It also asserts that "I.T" is also a subtype of
  795.    "IRep.TPrivate". A client that imports only the interface "I" has
  796.    access only to the fields and methods in "I.TPublic" when accessing an
  797.    object of type "I.T", but a client that imports both "I" and "IRep"
  798.    also has access to the fields and methods in "IRep.TPrivate" when
  799.    accessing an object of type "I.T".
  800.    
  801.    The "REVEAL" statement in this module simply asserts a subtype
  802.    relation. Unlike type declarations, revelations introduce no new
  803.    names. Hence, we could not have used the "TYPE" keyword in this case
  804.    because the type "I.T" has already been declared once (albeit
  805.    opaquely) in interface "I".
  806.    
  807.    Every opaque type must have a complete revelation. A complete
  808.    revelation has the form:
  809.    
  810.  
  811.   REVEAL
  812.     T = TConcrete;
  813.  
  814.    
  815.    
  816.    The revelation specifies that "TConcrete" is the concrete type for the
  817.    opaque type "T".
  818.    
  819.    The Modula-3 type system uses structural equivalence instead of name
  820.    equivalence. This means that two types are equal iff they have the
  821.    same structure. One consequence of this rule is that two types you
  822.    might intend to be distinct may actually be equal. This can have
  823.    unintended effects on the run-time behavior of your program. For
  824.    example, if both types that you expect to be distinct are actually
  825.    structurally equivalent and the two types guard two arms of a TYPECASE
  826.    statement, the arm for the second type will never be taken.
  827.    
  828.    If you want to avoid accidental equalities between two types, you can
  829.    brand one (or both) of them with the BRANDED keyword. A branded type
  830.    is equivalent to no other type, even if it is structurally equivalent
  831.    to some other type. In essence, the BRANDED keyword adds a bit of
  832.    virtual structure to the type that guarantees it will be distinct from
  833.    every other type.
  834.    
  835.    The Modula-3 syntax allows you to supply a text constant as a name for
  836.    the brand. If you don't supply an explicit brand, the compiler will
  837.    make one up; however, the implicit brand invented by the compiler is
  838.    not guaranteed to be chosen deterministically. Hence, explicit brands
  839.    are useful if you are communicating types from one process to another
  840.    and if you want to be sure that the branded type written by one
  841.    process matches the branded type read in by the other.
  842.    
  843.    Any two opaque types in a program must be distinct. Otherwise, it
  844.    would be too easy for clients to accidentally trip over type
  845.    collisions like the TYPECASE example mentioned above. To enforce the
  846.    restriction that all opaque types are distinct, the language requires
  847.    that the type "TConcrete" in the complete revelation above must be a
  848.    branded type.
  849.    
  850. Why uppercase keywords
  851.  
  852.    
  853.    
  854.    Some people prefer uppercase keywords others hate them. Another
  855.    possibility is to accept both forms for keywords. This topic has been
  856.    discussed at length and there is no solution that will completely
  857.    satisfy everyone's tastes. Fortunately this is a very minor issue and
  858.    you can easily have lowercase keywords automatically converted for you
  859.    using a macro package like m3su (pion.lcs.mit.edu:/pub/m3su) for
  860.    emacs.
  861.    
  862.    lowercase keywords macro
  863.    
  864. M3build versus Make or why m3 does not work
  865.  
  866.    
  867.    
  868.    The Modula-3 compiler m3 does a much finer grained dependency analysis
  869.    than possible with make. For this reason, a very flexible front end,
  870.    m3build, reads the program description files, m3makefile, and
  871.    generates the commands required to compile and link Modula-3 programs
  872.    and libraries. The m3makefile content is documented in the m3build
  873.    documentation. Calling the m3 compiler directly is difficult and thus
  874.    not recommended.
  875.    
  876. Missing RTHooks or similar messages
  877.  
  878.    
  879.    
  880.    The standard library, libm3, is not included by default. You need in
  881.    your m3makefiles to import(``libm3'') or to import a library which
  882.    imports libm3. Otherwise, messages about run time procedures such as
  883.    RTHooks not being available are produced.
  884.    
  885.    m3build
  886.    
  887. The program receives a SEGV signal under the debugger
  888.  
  889.    
  890.    
  891.    The garbage collector on some platforms uses the SEGV (segmentation
  892.    violation) signal to detect modified portions of the dynamically
  893.    allocated space. It is possible to disable this feature or to inform
  894.    the debugger to let these signals propagate. See the tips on how to
  895.    use the debugger.
  896.    
  897.    debugging
  898.    
  899. What is M3-lite, MS-Windows support
  900.  
  901.    
  902.    
  903.    M3-lite is a research project at DEC SRC to see how fast Modula-3
  904.    programs could be compiled and linked. It uses an integrated m3build,
  905.    m3 compiler and code generator (based on Burs) and is targeted at
  906.    Win32 (Windows NT or Windows Chicago). Research projects, by
  907.    definition, do not have release dates. Part of this work, when ready,
  908.    may also serve on other platforms, especially LINUX and FreeBSD since
  909.    they are intel based.
  910.    
  911.                                       FTP
  912.                                        
  913.    
  914.    
  915. How To Obtain Pre-Compiled Binaries
  916.  
  917.    
  918.    
  919.    The following binaries are available for FTP. If you are willing to
  920.    provide binaries for other architectures, please contact
  921.    dagenais@vlsi.polymtl.ca; they may be put on his FTP server or links
  922.    to your server can be included in the FAQ. The full exploded source
  923.    code tree is available along with the SPARC binaries.
  924.    
  925.      * Release 3.3 SPARC binaries. Contains most of the 3.3 release and
  926.        comes with static and shared libraries. If you have problems
  927.        building the 3.3 release for SPARC, you may want to look at the
  928.        lude/modula3-3.3/src/poly directory as it contains all the locally
  929.        modified files. The original source code is available in
  930.        lude/modula3-3.3/src/orig and may be browsed to see examples of
  931.        m3makefiles amd Modula-3 code. Requesting a directory with .tar.Z
  932.        added to its name will automatically generate the corresponding
  933.        compressed tar file.
  934.        
  935.        It can be retrieved from
  936.        ftp.vlsi.polymtl.ca:lude/modula3-3.3/run/poly.tar.Z and should be
  937.        placed in /usr/local/soft/modula3-3.3/run/poly... Then,
  938.        /usr/local/soft/modula3-3.3/run/poly/sun4.1_sparc/bin must be
  939.        added to your path. Compiled by Michel Dagenais.
  940.        
  941.        SPARC Modula3-3.1
  942.        
  943.      * Release 3.3 LINUX binaries. It can be retrieved from
  944.        ftp.vlsi.polymtl.ca:pub/m3/linux/src-m3-3.3l0.tar.gz and should be
  945.        placed in /usr/local/soft/modula3-3.3... Then,
  946.        /usr/local/soft/modula3-3.3/run/bin must be added to your path.
  947.        Compiled by Michel Dagenais.
  948.        
  949.        LINUX Modula3-3.3
  950.        
  951.      * Release 3.3 HPPA binaries. It can be retrieved from
  952.        ftp.vlsi.polymtl.ca:pub/m3/hppa. Compiled by Bert Laverman.
  953.        
  954.        HPPA Modula3-3.3
  955.        
  956.      * Release 3.3 68000 NeXT binaries. It can be retrieved from
  957.        ftp.vlsi.polymtl.ca:pub/m3/next. Compiled by Thomas Neumann.
  958.        
  959.        NeXT Modula3-3.3
  960.        
  961.    
  962.    
  963. What if I don't have ftp access?
  964.  
  965.    
  966.    
  967.    Unfortunately, DEC SRC cannot deliver Modula-3 other than by anonymous
  968.    ftp.
  969.    
  970.    Fortunately, Prime Time Freeware (PTF) includes Modula-3. PTF is a set
  971.    of two ISO-9660 CDroms filled with 3GB of freeware, issued
  972.    semi-annually. The latest issue, Volume 1, Number 2, July 1992,
  973.    contains SRC Modula-3 2.07. PTF is distributed via bookstores and
  974.    mail. You can reach PTF using:
  975.    
  976.  
  977.         Email:  ptf@cfcl.com
  978.         Fax:    [1] (408) 738 2050
  979.         Voice:  [1] (408) 738 4832
  980.         Mail:   Prime Time Freeware
  981.                 415-112 N. Mary Ave., Suite 50
  982.                 Sunnyvale, CA 94086
  983.                 USA
  984.  
  985.    
  986.    
  987.                                  CONTRIBUTING
  988.                                        
  989.    
  990.    
  991. Can I contribute Modula-3 software?
  992.  
  993.    
  994.    
  995.    Certainly. Send to m3-request@src.dec.com what you are willing to
  996.    share, be it programs, libraries or other things. They will be put in
  997.    the distribution.
  998.    
  999.    Right now, the pub/DEC/Modula-3/contrib directory contains:
  1000.    
  1001.    Contrib
  1002.    
  1003.      * m3rpc a Sun RPC system from Xerox Parc
  1004.      * M2toM3 a translator from Modula-2 to Modula-3
  1005.      * m3pc an implementation of Modula-3 for PCs.
  1006.        
  1007.    
  1008.    
  1009.    You will also find on ftp.vlsi.polymtl.ca in pub/m3:
  1010.    
  1011.    Modula-3 contributions
  1012.    
  1013.      * present-src-m3 slides for presenting the Modula-3 tools and
  1014.        libraries.
  1015.      * cache-anim a zeus graphical animation of the computer memory
  1016.        hierarchy.
  1017.      * realgeometry a floating point geometry package.
  1018.      * sequences sequences allowing insertions in the middle.
  1019.        
  1020.    
  1021.    
  1022. ILU, an object-oriented multi-lingual RPC-capable module system
  1023.  
  1024.    
  1025.    
  1026.    The following was recently announced by Xerox PARC:
  1027.    
  1028.    Version 1.6.4 of the Xerox PARC Inter-Language Unification (ILU)
  1029.    system is now available for general use.
  1030.    
  1031.    WHAT'S ILU?
  1032.    
  1033.    ILU (pronounced eye'-loo) is a system that promotes software
  1034.    interoperability via interfaces. Interfaces between what? Whatever
  1035.    units of program structure are desired; we call them by the generic
  1036.    term "modules". They could be parts of one process, all written in the
  1037.    same language; they could be parts written in different languages,
  1038.    sharing runtime support in one memory image; they could be parts
  1039.    running in different memory images on different machines (on different
  1040.    sides of the planet). A module could even be a distributed system
  1041.    implemented by many programs on many machines. Calls across ILU
  1042.    interfaces involve only as much mechanism as necessary for the calling
  1043.    and called modules to interact. In particular, when the two modules
  1044.    are in the same memory image and use the same data representations,
  1045.    the calls are direct local procedure calls - no stubs or other RPC
  1046.    mechanisms are involved.
  1047.    
  1048.    ILU modules are known by their interfaces. A module interface is
  1049.    specified once in ILU's object-oriented Interface Specification
  1050.    Language (called, simply, ISL). For each of the particular programming
  1051.    languages supported by ILU (currently Common Lisp, ANSI C, C++, and
  1052.    Modula-3; Python, Tcl, and GNU Emacs-Lisp are in the works), a version
  1053.    of the interface in that particular programming language can be
  1054.    generated. The ILU kernel library provides services which may be used
  1055.    by the language-specific interface to overcome intermodule language or
  1056.    address space differences.
  1057.    
  1058.    GETTING THE RELEASE
  1059.    
  1060.    The release is only available via FTP from the PARC ftp server.
  1061.    Perhaps the simplest way is to go through our World Wide Web home
  1062.    page,
  1063.    
  1064.    ILU
  1065.    
  1066.    CONTRIBUTORS
  1067.    
  1068.    Antony Courtney, Doug Cutting, Bill Janssen, Denis Severson, Mike
  1069.    Spreitzer, Mark Stefik, Farrell Wymore
  1070.    
  1071.                              MODULA-3 FOR TEACHING
  1072.                                        
  1073.    
  1074.    
  1075.    Modula-3 is very well suited for teaching: simple yet powerful, and
  1076.    safe. It avoids the complexity of legacy languages. It can be used to
  1077.    demonstrate modules and interfaces, object oriented programming,
  1078.    multi-threading (concurrency issues), graphical user interfaces
  1079.    (Trestle, VBTKit, FormsVBT) and even distributed programming (Network
  1080.    Objects, Obliq). Since less time is spent by students and teaching
  1081.    assistants chasing dangling pointers and corrupted data, more time is
  1082.    available for learning the important concepts.
  1083.    
  1084.    It is used for teaching in a number of universities. This list is far
  1085.    from complete, send corrections and additions to
  1086.    dagenais@vlsi.polymtl.ca.
  1087.    
  1088.    From: Carsten Whimster (bcrwhims@undergrad.math.uwaterloo.ca)
  1089.    
  1090.    University of Waterloo:
  1091.    
  1092.    CS246 - Third introductory course in computer science. Software
  1093.    engineering and software systems. Medium size projects. Uses Modula-3
  1094.    to demonstrate proper OO programming, as well as general programming
  1095.    practices.
  1096.    
  1097.    CS241 - Fourth and final intro course to CS. Focuses mainly on
  1098.    compilers and languages. Various assignments has students create most
  1099.    of the different parts of a compiler. Also introduces Scheme (lisp).
  1100.    
  1101.    From: Peter.Robinson@cl.cam.ac.uk
  1102.    
  1103.    University of Cambridge, England.
  1104.    
  1105.    The Computer Science course at the University of Cambridge teaches ML
  1106.    as an introductory language at the beginning of the freshman year, and
  1107.    then uses Modula-3 to develop imperative programming at the end of
  1108.    that year. Further lectures on advanced features of the language are
  1109.    given early in the second year, together with separate lectures on
  1110.    other, specialised languages.
  1111.    
  1112.    The course has been given to about 70 students each year since 1990,
  1113.    and has developed with the language. It ties in with other lectures on
  1114.    data structures and algorithms, software engineering and concurrency.
  1115.    Modula-3 is used for student group projects in the second year and for
  1116.    about a quarter of individual projects in the final year (where,
  1117.    interestingly, students using Modula-3 tend to earn higher grades than
  1118.    those using C/C++).
  1119.    
  1120.    Modula-3 is also used in the Computer Laboratory at Cambridge for a
  1121.    number of research projects on distributed computing, human-computer
  1122.    interaction and electronic CAD.
  1123.    
  1124.    From: Matthew.Huntbach@dcs.qmw.ac.uk
  1125.    
  1126.    We have used it for three years here at Queen Mary and Westfield
  1127.    College, London. The main problem I find with the language is the slow
  1128.    compilation speed on our teaching machines (Macs running A/UX),
  1129.    otherwise it's a nice language to teach with.
  1130.    
  1131.    From: laszlo@ifi.uni-klu.ac.at (Laszlo BOESZOERMENYI)
  1132.    
  1133.    University Klagenfurt
  1134.    
  1135.    Modula-3 is used at the following courses: Undergraduate:
  1136.    Softwaretechnology-1 (actually an introduction into programming) (on
  1137.    PCs) Softwaretechnology-2 (data structures and algorithms) (on PCs)
  1138.    Graduate: Computer Networks (on a network of DECs and SUNs) Parallel
  1139.    Programming (on an DEC-Alpha Farm)
  1140.    
  1141.    Modula-3 has been in use since ca. one year, with very good
  1142.    experiences.
  1143.    
  1144.    From: pk@i3.informatik.rwth-aachen.de (Peter Klein)
  1145.    
  1146.    Lehrstuhl fuer Informatik III, RWTH Aachen, Germany: Software
  1147.    Development Projects, now held for the second time using Modula-3. Aim
  1148.    of these projects is to introduce different aspects of software
  1149.    development to graduate students. This includes project planning,
  1150.    supervision, design, and cooperative implementation of small but
  1151.    usable software systems. Central ideas of software design and
  1152.    object-oriented implementation are presented and discussed with the
  1153.    concepts of Modula-3, which is also the implementation language.
  1154.    
  1155.    Future plans: Maybe Modula-3 will replace Modula-2 in some
  1156.    undergraduate programming lectures in the future.
  1157.    
  1158.    From: rro@cs.colostate.edu (Rod Oldehoeft)
  1159.    
  1160.    In the Computer Science Department at Colorado State University, M3 is
  1161.    envisioned as a vehicle for several courses.
  1162.    
  1163.    M3 is introduced in the second course (data structures) to implement
  1164.    the ADT concept, including generics. In the sophomore languages
  1165.    course, it is an example of an O-O language. In the junior software
  1166.    engineering course, additional relevant features are brought in, and
  1167.    threads are added in the junior operating systems course.
  1168.    
  1169.    From: viggo@nada.kth.se
  1170.    
  1171.    Royal Institute of Technology. Several courses at the computer science
  1172.    department use Modula-3. The courses contain programming projects, and
  1173.    many students choose to use Trestle. (Dr. Viggo Kann,
  1174.    viggo@nada.kth.se)
  1175.    
  1176.    From: "Dave Snelling" (snelling@cs.man.ac.uk)
  1177.    
  1178.    Department of Computer Science, University of Manchester, Manchester
  1179.    U.K. We have a small, interdisciplinary collection of people using
  1180.    Modula-3 for a variety of activities. Our major production code is a
  1181.    hardware architecture simulator (about 120 modules). Smaller projects
  1182.    include a Lattice Gass model and a Shallow Water model.
  1183.    
  1184.    At: University of Massachusetts at Amherst
  1185.    
  1186.    Modula-3 is used as an input language for the Computer Science course
  1187.    on Compilation techniques. The professor is Eliot Moss.
  1188.    
  1189.    From: Michel Dagenais (dagenais@vlsi.polymtl.ca)
  1190.    
  1191.    Modula-3 is used as the main example in a graduate course on
  1192.    ``Algorithmic Aspects of CAD'', which includes a large portion on OO
  1193.    programming and databases.
  1194.    
  1195.    From: pbh@cs.sunysb.edu (Peter Henderson)
  1196.    
  1197.    Modula-3 is currently used for teaching Computer Science I and
  1198.    Computer Science II at SUNY at Stony Brook. We are currently
  1199.    developing a sequence of laboratory assignments and case studies
  1200.    introducing OO techniques and software reuse in these two courses.
  1201.    
  1202.    The first course for computer science majors at Stony Brook is
  1203.    "Foundations of Computer Science" which emphasizes general problem
  1204.    solving, mathematics and the relationships between mathematics and
  1205.    computer science. There is an extensive laboratory component using
  1206.    theorem provers, Prolog and Standard ML.
  1207.    
  1208.                              MODULA-3 IN INDUSTRY
  1209.                                        
  1210.    
  1211.    
  1212.    A number of programming teams in industry selected Modula-3 for their
  1213.    project. It encourages good programming practices and comes with
  1214.    excellent libraries for distributed programming and graphical user
  1215.    interfaces.
  1216.    
  1217.    From: gwyant@cloyd.East.Sun.COM (Geoffrey Wyant - Sun Microsystems
  1218.    Labs BOS)
  1219.    
  1220.    Sun Microsystems Laboratories, Inc. (East) is using Modula-3 (Network
  1221.    Objects, FormsVBT) as the basis for its research in large scale
  1222.    distributed object systems.
  1223.    
  1224.    From: Farshad Nayeri (nayeri@gte.com)
  1225.    
  1226.    Distributed Object Computing, GTE Labs, Waltham, Massachusetts USA
  1227.    Modula-3 (FormsVBT, Sx, Netobj libraries) is used to prototype
  1228.    distributed object management. (Farshad Nayeri nayeri@gte.com).
  1229.    
  1230.    Report
  1231.    
  1232.                                WORK IN PROGRESS
  1233.                                        
  1234.    
  1235.    
  1236.    The purpose of this section is to let everyone know what is being
  1237.    worked on. This is not a commitment to a quick release or even to
  1238.    completion. However it may enable parties interested in the same
  1239.    topics to pool their efforts, avoid duplication or better integrate
  1240.    their packages.
  1241.    
  1242.    To find more information about the names mentioned, see the Who's Who
  1243.    section.
  1244.    
  1245. The SRC Compiler
  1246.  
  1247.    
  1248.    
  1249.    The compiler already implements the full language and runs on several
  1250.    platforms. Speed enhancements and support for some popular non-Unix
  1251.    platforms may be expected.
  1252.    
  1253. Modula-2 To Modula-3 Converter
  1254.  
  1255.    
  1256.    
  1257.    A better Modula-2 to Modula-3 converter (99%conversion...) is in the
  1258.    works under the supervision of Peter Klein.
  1259.    
  1260. Integrated Development Environment
  1261.  
  1262.    
  1263.    
  1264.    A number of groups have made experiments in this area. Tools such as
  1265.    VBTkit for the user interface, m3tk for syntax and dependency
  1266.    analysis, dynamic linking... could be used to produce such an
  1267.    environment. It is worth noting that precompiled interfaces are much
  1268.    easier to achieve in M3 than in several other popular languages.
  1269.    
  1270.    Peter Klein is working on a Modula-3 development environment and
  1271.    associated user interface. See the paper entitled ``Designing Software
  1272.    with Modula-3'', it describes a software architecture description
  1273.    language based on Modula-3.
  1274.    
  1275.    Report
  1276.    
  1277.    Klaus Preschern, Carsten Weich, Laszlo Boszormenyi have made the port
  1278.    of Modula-3 to the PC. The M3-PC environment will be enhanced,
  1279.    especially with threads and graphics, including a student-friendly
  1280.    environment.
  1281.    
  1282.    David N. Gray of Lucid Inc. has been experimenting with connecting the
  1283.    Modula-3 compiler with the Lucid Energize Programming System
  1284.    (currently sold as a development environment for C and C++ on Sun
  1285.    SPARCstations). The modified compiler is available as an unsupported
  1286.    as-is hack, to accompany the new Energize release that it works with.
  1287.    
  1288.    Energize Modula-3
  1289.    
  1290.    Geoff Wyant is experimenting with FormsVBT/VBTKit to build a simple
  1291.    friendly development environment.
  1292.    
  1293. Windowing And User Interfaces
  1294.  
  1295.    
  1296.    
  1297.   ROTATED TEXT
  1298.   
  1299.    
  1300.    
  1301.    Currently, there is no VBT to show non horizontal text, because of X
  1302.    windows limitations. This would be desirable and can be implemented in
  1303.    one of the following ways: a) open a pipe to the ghostscript
  1304.    Postscript interpreter and use it as a font renderer, cache and
  1305.    display the character bitmaps produced; b) have Bezier curves for the
  1306.    most popular Postscript fonts, Trestle handles Bezier curves; c) use
  1307.    the new text facilities in X11R6 that remove previous limitations. A
  1308.    prototype implementation of a) has been implemented by Alain Dube
  1309.    (contact Michel Dagenais); the performance with the cache is good but
  1310.    this remains a relatively complex solution. The b) solution would be
  1311.    relatively easy to implement but the resulting quality may not be as
  1312.    good as a real font renderer. The c) solution may not be available for
  1313.    some time since many workstation vendors take a long time before
  1314.    integrating the new X windows facilities.
  1315.    
  1316.   POSTSCRIPT VBTS
  1317.   
  1318.    
  1319.    
  1320.    It is often useful to display Postscript files in a VBT, for example
  1321.    for an included diagram in a document editor.
  1322.    
  1323.    This can be achieved by using the ghostscript Postscript interpreter
  1324.    as a rasterizer. A prototype has been programmed by Alain Dube
  1325.    (contact Michel Dagenais) but the performance is not too good when
  1326.    large color bitmaps are handled. An alternative implementation is to
  1327.    convert Postscript files into display lists (Bezier curves and text)
  1328.    as a preprocessing step. Further displaying and even editing becomes
  1329.    very simple. A prototype implementation of this has been done by
  1330.    Benoit Poirier (contact Michel Dagenais).
  1331.    
  1332. Persistent Objects
  1333.  
  1334.    
  1335.    
  1336.    With Pickles to store objects in files, the implementation of
  1337.    persistent objects is simplified. Furthermore, with the m3tk library
  1338.    it is not too difficult to read a type description and to write the
  1339.    needed methods to handle that type. Combined with FormsVBT, network
  1340.    objects and Obliq, all the ingredients are there to have a nice
  1341.    environment for developing graphical distributed applications with
  1342.    persistent state and querying facilities.
  1343.    
  1344.    Peter Klein has a specialized database for annotated graphs, GRAS,
  1345.    that is being re-implemented in Modula-3.
  1346.    
  1347.    Eliot Moss is working on persistent Modula-3 objects. The main
  1348.    features are persistence through reachability, load on demand and a
  1349.    very low overhead for using persistent objects. The high performance
  1350.    is obtained by modifying the compiler and run-time. Initially a
  1351.    modified version of GCC, GNU M3, was being worked on. However, with
  1352.    the release of the SRC native compiler, the modifications are being
  1353.    moved to the SRC compiler instead.
  1354.    
  1355.    Persistency
  1356.    
  1357. Abstract Syntax Tree Tools (M3 Parser)
  1358.  
  1359.    
  1360.    
  1361.    The m3tk library can be used to analyze Modula-3 source code in order
  1362.    to find specific constructions (use of OBSOLETE facilities, un-handled
  1363.    exceptions), build source code browser and analysis tools, stubs
  1364.    generators for network or persistent objects... Mick Jordan is
  1365.    preparing the 3.2 release of m3tk and finishing the documentation, in
  1366.    his spare time.
  1367.    
  1368.    From: hudson@yough.ucs.umass.edu (Rick Hudson)
  1369.    
  1370.    If anyone is interested we have developed a Bison grammar that parses
  1371.    the Modula-3 language input. If interested please feel free to contact
  1372.    me hudson@cs.umass.edu.
  1373.    
  1374. Computer Assisted Learning Tools (Algorithm Animation)
  1375.  
  1376.    
  1377.    
  1378.    The Zeus Algorithm Animation package may be used to quickly develop
  1379.    graphical and animated teaching aids. Most of the algorithms described
  1380.    in Robert Sedgewick's Algorithms book have been animated at DEC SRC
  1381.    through the work of Marc H. Brown.
  1382.    
  1383.    Animation of compilation techniques have been produced by students at
  1384.    University of Illinois with the help of Marc Najork.
  1385.    
  1386.    From: "Arnulf Mester" (mester@ls4.informatik.uni-dortmund.de)
  1387.    
  1388.    As part of a studental project advised by a college of mine and me a
  1389.    Mentor-like collection of Zeus-based animations of typical distributed
  1390.    algorithms and communication protocols (termed ZADA) has been
  1391.    compiled. Hopefully I'll get to include more information and access
  1392.    during the next weeks into our ZADA WWW home page
  1393.    
  1394.    ZADA
  1395.    
  1396. Presentations, Tutorials And Teaching Material
  1397.  
  1398.    
  1399.    
  1400.    Modula 3 is used for teaching in a number of Universities. Some
  1401.    Modula-3 related teaching material may be shared between interested
  1402.    parties.
  1403.    
  1404.    Michel Dagenais has a French presentation about the Modula 3 language
  1405.    that could be distributed.
  1406.    
  1407.    Geoff Wyant is preparing a tutorial on Modula-3 for the upcoming
  1408.    OOPSLA conference.
  1409.    
  1410. Reports And Books
  1411.  
  1412.    
  1413.    
  1414.    Sam Harbison is preparing a revised version of his existing book on
  1415.    Modula-3. He may include more material on the new libraries.
  1416.    
  1417.    Laszlo Boszormenyi, Roland Mittermeir and Carsten Weich are working on
  1418.    a book (it will be published in German and in English) with the
  1419.    work-title:
  1420.    
  1421.    "Programming in Style - An Introduction into Programming with
  1422.    Modula-3"
  1423.    
  1424.    The book will be published at Springer (in German in October 1994, in
  1425.    English maybe or December, or January 1995). For the book, the M3-PC
  1426.    environment will be enhanced, especially with threads and graphics,
  1427.    including a student-friendly environment.
  1428.    
  1429.    A book about writing distributed object oriented applications, using
  1430.    Modula-3, m3build, m3gdb, analyze_coverage, FormsVBT, Obliq and
  1431.    Network Objects is being planned by Geoff Wyant, Farshad Nayeri and
  1432.    Michel Dagenais.
  1433.    
  1434.    From: BERGINF@PACEVM.DAC.PACE.EDU (Joseph Bergin)
  1435.    
  1436.    I am also at work on a Modula-3 college level textbook. It will cover
  1437.    the data structures course and will stress data abstraction. It will
  1438.    be similar to my current book: Data Abstraction: The Object-Oriented
  1439.    Approach using C++, published by McGraw Hill. Status: The software has
  1440.    been built and I am currently writing the text itself. Joe Bergin,
  1441.    berginf@pacevm.dac.pace.edu, Pace University
  1442.    
  1443. Parallel Programming
  1444.  
  1445.    
  1446.    
  1447.    From: Ernst A. Heinz, University of Karlsruhe, F.R. Germany (email:
  1448.    heinze@ira.uka.de)
  1449.    
  1450.    I would like to inform you about our ongoing Modula-3* project here at
  1451.    the University of Karlsruhe. At the moment, we are actively involved
  1452.    in adding sophisticated dependence and data flow analysis to DEC's
  1453.    Modula-3 compiler (release 3.x!). The Modula-3* compiler will be able
  1454.    to generate code for real parallel machines, for networks of
  1455.    workstations, and for standard sequential execution. (Our new IPD
  1456.    Modula-2* system available by anonymous ftp from ftp.ira.uka.de in
  1457.    "pub/programming/modula2star" may give you an initial feeling about
  1458.    it!)
  1459.    
  1460.    For all interested folks I have made my JSPP'93 paper publicly
  1461.    available by anonymous ftp. The title of the paper reads as follows:
  1462.    
  1463.    "Modula-3*: An Efficiently Compilable Extension of Modula-3 for
  1464.    Problem-Oriented Explicitly Parallel Programming".
  1465.    
  1466.    Paper
  1467.    
  1468.    More recent work includes
  1469.    
  1470.    E.A. Heinz. Sequential and parallel exception handling in Modula-3*: A
  1471.    unifying semantics specification. In P. Schulthess (editor). Advances
  1472.    in Modular Languages: Proceedings of the Joint Modular Languages
  1473.    Conference, pages 31-49, Ulm, Germany, September 28-30, 1994.
  1474.    
  1475.    Paper
  1476.    
  1477.                                    WISH LIST
  1478.                                        
  1479.    
  1480.    
  1481.    The Modula-3 development environment now contains a large number of
  1482.    very good tools and libraries that work nicely together. The purpose
  1483.    of this section is to help contributors determine what additions would
  1484.    be helpful to others. It may get you in contact with people that would
  1485.    like to use your contribution or with people that may provide some
  1486.    items on your wanted list or team with you for their development.
  1487.    
  1488. M3Build
  1489.  
  1490.    
  1491.    
  1492.    The descriptions of programs and libraries stored in m3makefiles are
  1493.    simple and efficient. It would be interesting to be able to specify
  1494.    different m3-options for some files (debugging, performance
  1495.    analysis...), and to have the dependency analysis take into account
  1496.    previously used options when determining modules to recompile (Michel
  1497.    Dagenais).
  1498.    
  1499.    Although makefiles cannot perform the same consistency checks as
  1500.    m3build and are more cumbersome to use, it may be useful to be able to
  1501.    drive the compiler through makefiles for training purposes (i.e. learn
  1502.    Modula-3 and Makefiles at the same time)
  1503.    (bwbecker@watdragon.uwaterloo.ca).
  1504.    
  1505. Coverage And Performance Analysis
  1506.  
  1507.    
  1508.    
  1509.    Tools already exist for coverage analysis, pretty printing,
  1510.    performance analysis, viewing the threads and the garbage collected
  1511.    heap. It would be nice to have these easily accessible through an
  1512.    integrated development environment (Michel Dagenais).
  1513.    
  1514. More VBTs
  1515.  
  1516.    
  1517.    
  1518.    An editor widget with multiple fonts (fixed and proportional character
  1519.    spacing) perhaps even with direct support for HTML (item lists,
  1520.    centered headings...) (Geoff Wyant, Farshad Nayeri).
  1521.    
  1522.    A diagram editor widget (Farshad Nayeri).
  1523.    
  1524.    A split VBT that positions NxM childs in aligned rows and columns
  1525.    (Geoff Wyant).
  1526.    
  1527.    A Graph VBT that displays arbitrary graphs (such as call trees, cross
  1528.    references...). This could be implemented adding a placement module
  1529.    (to determine the vertex positions) to work on the existing GraphVBT
  1530.    module (Geoff Wyant).
  1531.    
  1532.    Some of the VBTs implemented in miscellaneous libraries (such as
  1533.    GraphVBT in Mentor/Zeus) could be placed in a more visible location
  1534.    such as VBTKit (Michel Dagenais).
  1535.    
  1536.    MIME extensions to Postcard (Farshad Nayeri).
  1537.    
  1538.    Submit Trestle to a graphical designer (Farshad Nayeri).
  1539.    
  1540. Distributed Computing (Network Objects)
  1541.  
  1542.    
  1543.    
  1544.    Network objects are an exciting recent addition. The underlying model
  1545.    is very simple and effective. Authentication and access control will
  1546.    be required in many applications.
  1547.    
  1548.    A network object daemon that starts specific programs upon need, like
  1549.    inetd does using inetd.conf for most network services, would be very
  1550.    useful (Michel Dagenais).
  1551.    
  1552. Interfaces To Other Libraries And Programs (Tcl, Dps...)
  1553.  
  1554.    
  1555.    
  1556.    C functions are easily called from Modula 3. Thus, stubs have been
  1557.    produced to access John Ousterhout's Tcl and also Display Postscript
  1558.    from Modula 3.
  1559.    
  1560.    An automatic tool to produce such stubs from .h C files would be very
  1561.    useful (Geoff Wyant).
  1562.    
  1563.    Stubs to access the Motif X Windows library would be useful (Geoff
  1564.    Wyant).
  1565.    
  1566.    Similar stubs would be desirable to access databases such as Postgres
  1567.    or Exodus and access/provide World Wide Web information using the
  1568.    hypertext transfer protocol libraries (HTTP) (Geoff Wyant).
  1569.    
  1570.                                    WHO'S WHO
  1571.                                        
  1572.    
  1573.    
  1574.    Modula-3 enthusiasts, users or contributors. Please notify me for
  1575.    additions, corrections or removals.
  1576.    
  1577.      * Robert Ayers, Adobe, (ayers@Mv.Us.Adobe.Com), the Display
  1578.        Postscript to Modula-3 interface
  1579.      * Andrew Birrell, DEC SRC, (birrell@src.dec.com), Network objects.
  1580.      * Laszlo Boeszoermenyi, Universitaet Klagenfurt, Austria,
  1581.        (laszlo@ifi.uni-klu.ac.at), PC port (m3pc), Programming in style
  1582.        book.
  1583.      * Marc H. Brown, DEC SRC, (mhb@src.dec.com), VBTKit, FormsVBT, Zeus.
  1584.      * Luca Cardelli, DEC SRC, (luca@src.dec.com), Modula-3 definition,
  1585.        Obliq.
  1586.      * Michel Dagenais, Ecole Polytechnique de Montreal,
  1587.        (dagenais@vlsi.polymtl.ca), LINUX and SPARC M3 binaries, M3 FAQ.
  1588.      * John D. DeTreville, DEC SRC, (jdd@src.dec.com), Incremental
  1589.        garbage collector.
  1590.      * David N. Gray, Lucid Inc., Menlo Park, (gray@Lucid.Com), interface
  1591.        between the Lucid environment and the M3 compiler.
  1592.      * Sam Harbison, Tartan, harbison@tartan.com, Modula-3 book.
  1593.      * Ernst A. Heinz, University of Karlsruhe, F.R. Germany
  1594.        (heinze@ira.uka.de)
  1595.      * Allan Heydon, DEC SRC, (heydon@src.dec.com), IP, Lex, Fmt, PQueue,
  1596.        DblBufferVBT modules.
  1597.      * Jim Horning, DEC SRC, (horning@src.dec.com), Useful Modula-3
  1598.        interfaces.
  1599.      * Rick Hudson, University of Massachusetts at Amherst,
  1600.        (hudson@cs.umass.edu), GNU Modula-3.
  1601.      * Mick Jordan, Sunlabs near Palo Alto, mick.jordan@eng.sun.com,
  1602.        Modula-3 definition, M3TK and related tools.
  1603.      * Bill Kalsow, DEC SRC, (kalsow@src.dec.com), Modula-3 definition,
  1604.        M3 compiler and run-time.
  1605.      * Peter Klein, Lehrstuhl fuer Informatik III,
  1606.        (pk@i3.informatik.rwth-aachen.de). Modula-2 to Modula-3 converter.
  1607.      * Bert Laverman, Groningen University, (laverman@cs.rug.nl), HPPA
  1608.        support.
  1609.      * Mark S. Manasse, DEC SRC, (msm@src.dec.com), Trestle.
  1610.      * Paul McJones, DEC SRC, (mcjones@src.dec.com), Useful Modula-3
  1611.        interfaces.
  1612.      * James R. Meehan, Adobe (jmeehan@mv.us.adobe.com), VBTKit,
  1613.        FormsVBT.
  1614.      * Roland Mittermeir, Universitaet Klagenfurt, Austria,
  1615.        (mittermeir@ifi.uni-klu.ac.at), Programming in style book.
  1616.      * Eliot Moss, University Of Massachusetts At Amherst,
  1617.        (moss@Cs.Umass.Edu), GNU Modula-3.
  1618.      * Eric Muller, DEC SRC (moved?), (muller@src.dec.com), M3 compiler
  1619.        and run-time.
  1620.      * Marc Najork, DEC SRC, (najork@src.dec.com), 3D animation.
  1621.      * Greg Nelson, DEC SRC, (gnelson@src.dec.com), Modula-3 definition,
  1622.        Systems Programming with Modula-3 book editor, Trestle, Network
  1623.        objects.
  1624.      * Farshad Nayeri, GTE Labs Near Boston, (nayeri@Gte.Com), m3-sparc
  1625.        mailing list.
  1626.      * Frode Odegard, (frode@Odegard.Com), commercial Modula-3 support.
  1627.      * Susan Owicki, Stanford University, (owicki@mojave.stanford.edu),
  1628.        Network objects.
  1629.      * Klaus Preschern, Universitaet Klagenfurt, Austria,
  1630.        (preschern@ifi.uni-klu.ac.at), PC port (m3pc).
  1631.      * Robert Sedgewick, Princeton University, Algorithms in Modula-3
  1632.        book.
  1633.      * Jorge Stolfi, University of Campinas, Brazil,
  1634.        (stolfi@dcc.unicamp.br), Computational geometry procedures.
  1635.      * Carsten Weich, Universitaet Klagenfurt, Austria,
  1636.        (weich@ifi.uni-klu.ac.at), PC port (m3pc), Programming in style
  1637.        book.
  1638.      * Edward Wobber, DEC SRC, (wobber@src.dec.com), Network objects.
  1639.      * Geoff Wyant, Sunlabs Near Boston, (gwyant@East.Sun.COM), SPARC
  1640.        port.
  1641.        
  1642.    
  1643.    
  1644.    
  1645.      _________________________________________________________________
  1646.    
  1647.    
  1648.    
  1649.     Michel Dagenais, dagenais@vlsi.polymtl.ca, Mon Nov 14 11:38:58 GMT
  1650.     1994
  1651. --
  1652.  
  1653. Prof. Michel Dagenais                dagenais@vlsi.polymtl.ca
  1654. Dept of Electrical and Computer Eng.
  1655. Ecole Polytechnique de Montreal            tel: (514) 340-4029
  1656.  
  1657.  
  1658.